ihelpuoo.weboo.runtime.ModuleDetail = function(m)
{
	this.module = m;
	this.comment = null;
	this.actionHome = null;
	this.inputCharset = null;
	this.outputCharset = null;
	this.installer = null;
	this.uninstaller = null;
	this.controllers = null;
	this.messages = null;
	this.configs = null;
	this.jsHome = null;
	this.styleHome = null;
	
	this.HTML = null;
}

ihelpuoo.weboo.runtime.ModuleDetail.prototype
=
{
	valueOf: function(ele)
	{
		this.comment = ihelpuoo.xml.getElementText(ele,"comment");
		this.actionHome = ihelpuoo.xml.getElementText(ele,"action-home");
		this.jsHome = ihelpuoo.xml.getElementText(ele,"js-home");
		this.styleHome = ihelpuoo.xml.getElementText(ele,"style-home");
		this.inputCharset = ihelpuoo.xml.getElementText(ele,"input-charset");
		this.outputCharset = ihelpuoo.xml.getElementText(ele,"output-charset");
		this.installer = ihelpuoo.xml.getElementText(ele,"installer");
		this.uninstaller = ihelpuoo.xml.getElementText(ele,"uninstaller");
		var es = ele.getElementsByTagName("controllers");
		this.controllers = new ihelpuoo.weboo.runtime.ModuleControllerSet();
		if(es.length>0)
			this.controllers.valueOf(es[0]);

		es = ele.getElementsByTagName("message-set");
		this.messages = new ihelpuoo.weboo.runtime.MessageSet(this.module);
		if(es.length>0)
			this.messages.valueOf(es[0]);

		es = ele.getElementsByTagName("configs");
		this.configs = new ihelpuoo.weboo.runtime.ModuleConfigSet();
		if(es.length>0)
			this.configs.valueOf(es[0]);
	}
	
	,
	render: function()
	{
		if(this.HTML == null)
		{
			this.HTML = new ihelpuoo.weboo.runtime.ModuleDetailHTML();
			this.HTML.setTitle(this.module.name);
			this.HTML.setComment(this.comment);
			this.HTML.setActionHome(this.actionHome);
			this.HTML.setJsHome(this.jsHome);
			this.HTML.setStyleHome(this.styleHome);
			this.HTML.setInputCharset(this.inputCharset);
			this.HTML.setOutputCharset(this.outputCharset);
			this.HTML.setInstaller(this.installer);
			this.HTML.setUninstaller(this.uninstaller);
			this.HTML.setControllersHTML(this.controllers.render());
			this.HTML.setConfigHTML(this.configs.render());
			this.HTML.setMessageHTML(this.messages.render())
		}
		this.HTML.show();
		return this.HTML.shell;
	}
		
	,
	dump: function()
	{
		return this.module.dump()+"\r\n"+this.actionHome;
	}
}